home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / Interim Executive Decision / patch / replace / Steve.c next >
Encoding:
C/C++ Source or Header  |  1998-06-21  |  929 b   |  45 lines  |  [TEXT/CWIE]

  1. #include <A4Stuff.h>
  2. #include <Gestalt.h>
  3. #include <Resources.h>
  4. #include <Types.h>
  5.  
  6. //============================================================================
  7.  
  8. //============================================================================
  9.  
  10. /*
  11.  
  12. static asm test();
  13. asm test()
  14. {
  15.     move.l #1234,(A0)
  16.     rts
  17. }
  18.  
  19. Hunk:    Kind=HUNK_LOCAL_CODE  Name="test"(1)  Size=16
  20. 00000000: 20BC 0000 04D2     move.l    #1234,(a0)
  21. 00000006: 4E75               rts
  22. 00000008: 8474 6573 7400     dc.b      0x84,'test',0x00
  23. 0000000E: 0000           
  24.  
  25. */
  26.  
  27. //============================================================================
  28.  
  29. void main (void)
  30. {
  31.     long                oldA4 = SetCurrentA4();
  32.     OSErr                err = noErr;
  33.     SelectorFunctionUPP    oldRtn;
  34.  
  35.     DetachResource(GetResource('INIT', 0));
  36.  
  37. //    err = NewGestalt('SPJ!', 
  38.  
  39. //    err = ReplaceGestalt('SPJ!', , &oldRtn);
  40.  
  41.     SetA4(oldA4);
  42. }
  43.  
  44. //============================================================================
  45.